#include <iostream>
#include <fstream>
#include <string>
using namespace std;

int main()
{
  ofstream out("./log.txt", ios::out | ios::binary);
  if(!out.is_open())
  {
    cerr << "open error" << endl;
    return 1;
  }

  string msg("hello wrold"); 
  out.write(msg.c_str(), msg.size());
  out.close();
  return 0;
}
